package controller

import (
	pb "../protobuf"
	"fmt"
	"golang.org/x/net/context"
	app "../Sourcecode"
	common"../Common"
)

func (s Service) DataSync(ctx context.Context, in *pb.DataSyncRequest) (*pb.DataSyncReply, error) {
	// 接口实现
	 err := common.New("输入参数错误")
	switch int(in.Tablename) {
	case 0:
		err=app.GetQuestion()
	break
	case 1:
		err=app.GetChechknowledge()
	}
	 fmt.Printf("ceshi",err)
	return &pb.DataSyncReply{}, err
}